﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Xml;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            OpenFileDialog openf = new OpenFileDialog();
            openFileDialog1.Multiselect = true;
            openFileDialog1.Filter = ".cs";
            DialogResult result;
            result = openf.ShowDialog();
            if (result == DialogResult.OK)
                for (int i = 0; i < openFileDialog1.FileNames.Length; i++)
                    listBox1.Items.Add(openFileDialog1.FileNames[i]);
            else
                listBox1.Items.Clear();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            saveFileDialog1.Filter = "Type | *.txt";
            DialogResult result;
            result = saveFileDialog1.ShowDialog();
            if(result==DialogResult.OK)
            {
                
                //ghi va luu vao du lieu
                //va luu vso dia cung

                textBox1.Text = saveFileDialog1.FileName;
            }
        }

    }
}
